# coding: utf-8
import unittest

class TestStringMethods(unittest.TestCase):

    def test_upper(self):
        self.assertEqual('foo'.upper(), 'FOO')
        print 'i m test_upper'

    def test_isupper(self):
        self.assertTrue('foo'.isupper())
        self.assertFalse('Foo'.isupper())
        print 'i m test_isupper'

    def test_split(self):
        s = 'hello world'
        self.assertEqual(s.split(), ['hello', 'world'])
        # check that s.split fails when the separator is not a string
        with self.assertRaises(TypeError):
            s.split(2)
        print 'i m test_split'

class DefaultWidgetSizeTestCase(unittest.TestCase):
    def runTest(self):
        widget = Widget('The widget')
        self.assertEqual(widget.size(), (50, 50), 'incorrect default size')

if __name__ == '__main__':
    # suite = unittest.TestLoader().loadTestsFromTestCase(TestStringMethods)
    # unittest.TextTestRunner(verbosity=2).run(suite)
    unittest.main()